STRACE_SRC=$(shell /bin/pwd -P)/strace-4.7

.PHONY: all strace install clean
all: strace

strace:
	if [ ! -f $(STRACE_SRC)/Makefile ]; then \
		cd $(STRACE_SRC) && ./configure --prefix=/usr --host=$(CROSSMAKE_HOST) ; \
	fi
	if [ -f $(STRACE_SRC)/Makefile ]; then \
		$(MAKE) -C $(STRACE_SRC) ; \
	fi

install: strace
	cp -f $(STRACE_SRC)/strace $(INSTALL_ROOT)/usr/bin/

clean:
	if [ -f $(STRACE_SRC)/Makefile ]; then \
		$(MAKE) -C $(STRACE_SRC) distclean ; \
	fi
